package org.eduapp.trains.dao.train;

import java.util.List;

import org.eduapp.trains.DAOException;
import org.eduapp.trains.dao.BaseDAO;
import org.eduapp.trains.model.train.ModelTrain;
import org.eduapp.trains.vo.VoTrainSearch;
import org.eduapp.trains.web.support.PaginationSupport;

public interface TrainDAO extends BaseDAO<ModelTrain> {
	
	/**
	 * 
	 * @param no
	 * @return
	 * @throws DAOException
	 */
	ModelTrain getByTrainNo (String no) 
		throws DAOException;
	
	/**
	 * 
	 * @return
	 * @throws DAOException
	 */
	List<ModelTrain> getAll () 
		throws DAOException;
	
	/**
	 * 
	 * @return
	 * @throws DAOException
	 */
	List<ModelTrain> getTrainToBeUpdated()
		throws DAOException;
	
	/**
	 * 
	 * @param stationSrc
	 * @param stationDst
	 * @param offset
	 * @param pageSize
	 * @param order
	 * @param isDesc
	 * @return
	 * @throws DAOException
	 */
	PaginationSupport<ModelTrain> getByStation2Station (String stationSrc, String stationDst,int offset, int pageSize, String order, Boolean isDesc) 
		throws DAOException;
	
	/**
	 * 
	 * @param stationSrc
	 * @param stationDst
	 * @param offset
	 * @param pageSize
	 * @param order
	 * @param isDesc
	 * @param vo
	 * @return
	 * @throws DAOException
	 */
	PaginationSupport<ModelTrain> getByStation2Station (String stationSrc, String stationDst,int offset, int pageSize, String order, Boolean isDesc, VoTrainSearch vo) 
		throws DAOException;
		
	/**
	 * 
	 * @param stationName
	 * @param offset
	 * @param pageSize
	 * @param order
	 * @param isDesc
	 * @return
	 * @throws DAOException
	 */
	PaginationSupport<ModelTrain> getByStations(String stationName, int offset, int pageSize, String order, Boolean isDesc) 
		throws DAOException;
	
}
